<!DOCTYPE html>
<html lang="en">

<head>
   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <title>imge</title>
</head>

<body>
   <button id="btn1">click me</button> <br><br>

   <script>
      // var img = document.createElement("img");
      var img = new Image();
      img.src = "img/1.jpg";
      document.body.appendChild(img);

      var btn1 = document.getElementById("btn1");
      console.log(btn1);
      console.dir(btn1); //查看结构
   </script>
</body>

</html>